package com.zzl.mq.network.gossip;

import java.io.Serializable;

public class GossipMessage implements Serializable {
    private String messageId;
    private String nodeId;
    private MessageType type;
    private Object payload;
    private long timestamp;
    
    public enum MessageType {
        HEARTBEAT,
        NODE_JOIN,
        NODE_LEAVE,
        STATE_UPDATE,
        DATA_MESSAGE
    }

    public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public String getNodeId() {
        return nodeId;
    }

    public void setNodeId(String nodeId) {
        this.nodeId = nodeId;
    }

    public MessageType getType() {
        return type;
    }

    public void setType(MessageType type) {
        this.type = type;
    }

    public Object getPayload() {
        return payload;
    }

    public void setPayload(Object payload) {
        this.payload = payload;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }
} 